<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Minikombajn Pomiarowy: Plik źródłowy /home/arek/Dokumenty/AVRprograms/MKP_3_7/avr_compiler.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Wygenerowano przez Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Szukaj');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Minikombajn Pomiarowy&#160;<span id="projectnumber">1.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Strona&#160;główna</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Szukaj" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&#160;plików</span></a></li>
      <li><a href="globals.html"><span>Globalne</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>/home/arek/Dokumenty/AVRprograms/MKP_3_7/avr_compiler.h</h1>  </div>
</div>
<div class="contents">
<a href="avr__compiler_8h.html">Idź do dokumentacji tego pliku.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* This file has been prepared for Doxygen automatic documentation generation.*/</span>
<a name="l00045"></a>00045 <span class="preprocessor">#ifndef COMPILER_AVR_H</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define COMPILER_AVR_H</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span>
<a name="l00048"></a>00048 <span class="preprocessor">#ifndef F_CPU</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span>
<a name="l00050"></a><a class="code" href="avr__compiler_8h.html#a43bafb28b29491ec7f871319b5a3b2f8">00050</a> <span class="preprocessor">#define F_CPU 2000000UL</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00053"></a>00053 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00054"></a>00054 <span class="preprocessor">#include &lt;stdbool.h&gt;</span>
<a name="l00055"></a>00055 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00056"></a>00056 
<a name="l00058"></a><a class="code" href="avr__compiler_8h.html#a0a4fb62f9e69209c9c8c8e34ebb3df6f">00058</a> <span class="preprocessor">#define AVR_ENTER_CRITICAL_REGION( ) uint8_t volatile saved_sreg = SREG; \</span>
<a name="l00059"></a>00059 <span class="preprocessor">                                     cli();</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>
<a name="l00064"></a><a class="code" href="avr__compiler_8h.html#a770b47b04eec57748be0826a3d23503b">00064</a> <span class="preprocessor">#define AVR_LEAVE_CRITICAL_REGION( ) SREG = saved_sreg;</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span>
<a name="l00066"></a>00066 <span class="preprocessor">#if defined( __ICCAVR__ )</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span>
<a name="l00068"></a>00068 <span class="preprocessor">#include &lt;inavr.h&gt;</span>
<a name="l00069"></a>00069 <span class="preprocessor">#include &lt;ioavr.h&gt;</span>
<a name="l00070"></a>00070 <span class="preprocessor">#include &lt;intrinsics.h&gt;</span>
<a name="l00071"></a>00071 <span class="preprocessor">#include &lt;pgmspace.h&gt;</span>
<a name="l00072"></a>00072 
<a name="l00073"></a>00073 <span class="preprocessor">#ifndef __HAS_ELPM__</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#define _MEMATTR  __flash</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* __HAS_ELPM__ */</span>
<a name="l00076"></a>00076 <span class="preprocessor">#define _MEMATTR  __farflash</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __HAS_ELPM__ */</span>
<a name="l00078"></a>00078 
<a name="l00089"></a>00089 <span class="preprocessor">#define delay_us( us )   ( __delay_cycles( ( F_CPU / 1000000UL ) * ( us ) ) )</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span>
<a name="l00104"></a>00104 <span class="preprocessor">#define PRAGMA(x) _Pragma( #x )</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor">#define ISR(vec) PRAGMA( vector=vec ) __interrupt void handler_##vec(void)</span>
<a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#define sei( ) (__enable_interrupt( ))</span>
<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#define cli( ) (__disable_interrupt( ))</span>
<a name="l00108"></a>00108 <span class="preprocessor"></span>
<a name="l00110"></a>00110 <span class="preprocessor">#define nop( ) (__no_operation())</span>
<a name="l00111"></a>00111 <span class="preprocessor"></span>
<a name="l00113"></a>00113 <span class="preprocessor">#define watchdog_reset( ) (__watchdog_reset( ))</span>
<a name="l00114"></a>00114 <span class="preprocessor"></span>
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 <span class="preprocessor">#define INLINE PRAGMA( inline=forced ) static</span>
<a name="l00117"></a>00117 <span class="preprocessor"></span>
<a name="l00118"></a>00118 <span class="preprocessor">#define FLASH_DECLARE(x) _MEMATTR x</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span><span class="preprocessor">#define FLASH_STRING(x) ((_MEMATTR const char *)(x))</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span><span class="preprocessor">#define FLASH_STRING_T  char const _MEMATTR *</span>
<a name="l00121"></a>00121 <span class="preprocessor"></span><span class="preprocessor">#define FLASH_BYTE_ARRAY_T uint8_t const _MEMATTR *</span>
<a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor">#define PGM_READ_BYTE(x) *(x)</span>
<a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor">#define PGM_READ_WORD(x) *(x)</span>
<a name="l00124"></a>00124 <span class="preprocessor"></span>
<a name="l00125"></a>00125 <span class="preprocessor">#define SHORTENUM </span>
<a name="l00126"></a>00126 <span class="preprocessor"></span>
<a name="l00127"></a>00127 <span class="preprocessor">#elif defined( __GNUC__ )</span>
<a name="l00128"></a>00128 <span class="preprocessor"></span>
<a name="l00129"></a>00129 <span class="preprocessor">#include &lt;avr/io.h&gt;</span>
<a name="l00130"></a>00130 <span class="preprocessor">#include &lt;avr/interrupt.h&gt;</span>
<a name="l00131"></a>00131 <span class="preprocessor">#include &lt;avr/pgmspace.h&gt;</span>
<a name="l00132"></a>00132 <span class="preprocessor">#include &lt;util/delay.h&gt;</span>
<a name="l00133"></a>00133 
<a name="l00135"></a>00135 <span class="preprocessor">#define delay_us( us )   (_delay_us( us ))</span>
<a name="l00136"></a>00136 <span class="preprocessor"></span>
<a name="l00137"></a>00137 <span class="preprocessor">#define INLINE static inline</span>
<a name="l00138"></a>00138 <span class="preprocessor"></span>
<a name="l00140"></a>00140 <span class="preprocessor">#define nop()   do { __asm__ __volatile__ (&quot;nop&quot;); } while (0)</span>
<a name="l00141"></a>00141 <span class="preprocessor"></span>
<a name="l00142"></a>00142 <span class="preprocessor">#define MAIN_TASK_PROLOGUE int</span>
<a name="l00143"></a>00143 <span class="preprocessor"></span>
<a name="l00144"></a>00144 
<a name="l00145"></a>00145 <span class="preprocessor">#define MAIN_TASK_EPILOGUE() return -1;</span>
<a name="l00146"></a>00146 <span class="preprocessor"></span>
<a name="l00147"></a>00147 <span class="preprocessor">#define SHORTENUM __attribute__ ((packed))</span>
<a name="l00148"></a>00148 <span class="preprocessor"></span>
<a name="l00149"></a>00149 <span class="preprocessor">#else</span>
<a name="l00150"></a>00150 <span class="preprocessor"></span><span class="preprocessor">#error Compiler not supported.</span>
<a name="l00151"></a>00151 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00152"></a>00152 <span class="preprocessor"></span>
<a name="l00153"></a>00153 <span class="preprocessor">#endif</span>
<a name="l00154"></a>00154 <span class="preprocessor"></span>
</pre></div></div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Pliki</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Funkcje</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Zmienne</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Definicje</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Wygenerowano Fri Dec 30 2011 17:28:02 dla Minikombajn Pomiarowy programem&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
